<?php require ("../header.php"); ?>
<?php
	//check admin privillege
	if ($ad_check<1){
			header ("Location:../login.php?action=0");
	}
?>

<?php
	//get all the data using GET variables
	if (isset($_GET['topic'])) {
		$topic=$_GET['topic'];
	} else {
		echo "";
	}
	if (isset($_GET['id'])) {
		$admin_id=$_GET['id'];
	} else {
		echo "";
	}
	if (isset($_GET['note_id'])) {
		$note_id=$_GET['note_id'];
	} else {
		echo "";
	}
?>

<?php
	//Deletion process begin here.
	$sql_delete="DELETE FROM notes WHERE note_admin_id='$admin_id' AND notes_id='$note_id'";
	$delete=mysql_query($sql_delete) or die("Cannot delete notes.  SQL error");
	echo "<center><br><br><br><br><br><br>NOTES SUCCESSFULLY DELETE.  YOU WILL BE REDIRECTED TO NOTES SECTION.</CENTER><br><br><br><br><br><br><br><br>";
	echo "<META http-equiv=\"refresh\" content=\"2;URL=../notes.php\">";
?>
<?php require ("../footer.php"); ?>
